<template>
    <div>
        <input type="text" v-model="userName">
        <input type="password" name="" id="" v-model="userPass">
        <button @click="deng">登录</button>
        {{ this.$store.state.user.isLogin }}
    </div>
</template>
<script>
export default {
    head:{
        title:"登录、注册"
    },
    data(){
        return{
            userName:"",
            userPass:""
        }
    },
    methods:{
        async deng(){
            let user={
                userName:this.userName,
                userPass:this.userPass
            }
            this.$store.dispatch("user/set_login",user)
        }
    }
}
</script>